import type { CustomRouteRaw } from "@/router/type";

export default [
    {
        path: "/",
        redirect: "/home",
        meta: {
            hideInMenu: true,
        },
    },
    {
        path: "/home",
        meta: {
            title: "首页",
            affix: true,
        },
        component: "@/views/home",
    },
    {
        path: "/components",
        meta: {
            title: "内置组件",
            icon: "Box",
        },
        redirect: "change-password",
        children: [
            {
                path: "change-password",
                meta: { title: "change-password" },
                component: "@/views/components/change-password",
            },
            { path: "counter", meta: { title: "counter" }, component: "@/views/components/counter" },
            {
                path: "forget-password",
                meta: { title: "forget-password" },
                component: "@/views/components/forget-password",
            },
            { path: "login", meta: { title: "login" }, component: "@/views/components/login" },
            { path: "password", meta: { title: "password" }, component: "@/views/components/password" },
            { path: "register", meta: { title: "register" }, component: "@/views/components/register" },
            {
                path: "register-success",
                meta: { title: "register-success" },
                component: "@/views/components/register-success",
            },
            { path: "result", meta: { title: "result" }, component: "@/views/components/result" },
            { path: "captcha", meta: { title: "captcha" }, component: "@/views/components/captcha" },
        ],
    },
    {
        path: "/channel",
        meta: {
            title: "渠道管理",
            icon: "Suitcase",
        },
        children: [
            {
                path: "manager",
                meta: {
                    title: "渠道经理管理",
                },
                redirect: "list",
                children: [
                    {
                        path: "list",
                        meta: {
                            hideInMenu: true,
                            title: "渠道经理管理",
                        },
                        component: "@/views/channel/manager/list",
                    },
                    {
                        path: "add",
                        meta: {
                            title: "添加渠道经理",
                            hideInMenu: true,
                        },
                        component: "@/views/channel/manager/details",
                    },
                    {
                        path: "edit",
                        meta: {
                            title: "编辑渠道经理",
                            hideInMenu: true,
                        },
                        component: "@/views/channel/manager/details",
                    },
                ],
            },
            {
                path: "/channel/promoter",
                meta: {
                    title: "地推人员管理",
                    auth: false,
                },
                redirect: "list",
                children: [
                    {
                        path: "/channel/promoter/list",
                        meta: {
                            title: "地推人员管理",
                            hideInMenu: true,
                        },
                        component: "@/views/channel/promoter",
                    },
                    {
                        path: "/channel/promoter/details",
                        meta: {
                            hideInMenu: true,
                        },
                        component: "@/views/channel/promoter/details",
                    },
                ],
            },
        ],
    },
    {
        path: "link",
        meta: {
            title: "外部链接",
            icon: "Link",
        },
        children: [
            {
                link: "https://www.baidu.com",
                meta: {
                    title: "百度",
                    auth: false,
                },
            },
            {
                link: "https://www.google.cn",
                meta: {
                    title: "谷歌",
                },
            },
        ],
    },
    {
        link: "http://www.caih.com",
        meta: {
            title: "东信",
            auth: false,
        },
    },
] as CustomRouteRaw[];
